package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/13 17:27
 * 邮箱：648859026@qq.com
 */
public class ForgotPasswordStep1Action extends AHttpService<PbBean.PbResUserForgotPasswordStep1>{
    /**
     * 忘记密码找回步骤1
     * @param context
     * @param mobile 手机号码
     * @return
     */
    public static ForgotPasswordStep1Action newInstance(Context context, String mobile){
        return new ForgotPasswordStep1Action(context, mobile);
    }
    private String mobile;
    private ForgotPasswordStep1Action(Context context, String mobile) {
        super(context);
        this.mobile = mobile;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserForgotPasswordStep1.Builder builder = PbBean.PbReqUserForgotPasswordStep1.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setMobile(mobile);

        return apiService.forgotPasswordStep1(builder.build());
    }
}
